package com.rany.day02;

public class DemoStringPractise {
    public static void main(String[] args) {
        int[] array = {1,2,3};
        String s = fromArrayToString(array);
        System.out.println(s);
    }

    public static String fromArrayToString(int[] array){
        String str = "[";
        for (int i = 0; i < array.length; i++) {
            if (i == array.length-1){
                str += "word"+array[i]+"]";
            }else {
                str += "word" + array[i] + "#";
            }
        }
        return str;
    }
}
